package com.fsy.fmms.workorder.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
*
*  @author author
*/
public class WbWorkOrder implements Serializable {

    private static final long serialVersionUID = 1567600529806L;


    /**
    * 主键
    * 
    * isNullAble:0
    */
    private Integer id;

    /**
    * 
    * isNullAble:0
    */
    private Integer type;

    /**
    * 
    * isNullAble:1
    */
    private String name;

    /**
    * 
    * isNullAble:0
    */
    private String processId;

    /**
    * 
    * isNullAble:1
    */
    private String project;

    /**
    * 
    * isNullAble:0
    */
    private java.time.LocalDateTime createTime;

    /**
    * 
    * isNullAble:1
    */
    private java.time.LocalDateTime completeTime;

    /**
    * 
    * isNullAble:1
    */
    private Integer status;

    /**
    * 
    * isNullAble:1
    */
    private Integer curUser;

    /**
    * 
    * isNullAble:0
    */
    private Integer createUser;

    /**
    * 
    * isNullAble:1
    */
    private Integer acceptUser;


    public void setId(Integer id){this.id = id;}

    public Integer getId(){return this.id;}

    public void setType(Integer type){this.type = type;}

    public Integer getType(){return this.type;}

    public void setName(String name){this.name = name;}

    public String getName(){return this.name;}

    public void setProcessId(String processId){this.processId = processId;}

    public String getProcessId(){return this.processId;}

    public void setProject(String project){this.project = project;}

    public String getProject(){return this.project;}

    public void setCreateTime(java.time.LocalDateTime createTime){this.createTime = createTime;}

    public java.time.LocalDateTime getCreateTime(){return this.createTime;}

    public void setCompleteTime(java.time.LocalDateTime completeTime){this.completeTime = completeTime;}

    public java.time.LocalDateTime getCompleteTime(){return this.completeTime;}

    public void setStatus(Integer status){this.status = status;}

    public Integer getStatus(){return this.status;}

    public void setCurUser(Integer curUser){this.curUser = curUser;}

    public Integer getCurUser(){return this.curUser;}

    public void setCreateUser(Integer createUser){this.createUser = createUser;}

    public Integer getCreateUser(){return this.createUser;}

    public void setAcceptUser(Integer acceptUser){this.acceptUser = acceptUser;}

    public Integer getAcceptUser(){return this.acceptUser;}
    @Override
    public String toString() {
        return "WbWorkOrder{" +
                "id='" + id + '\'' +
                "type='" + type + '\'' +
                "name='" + name + '\'' +
                "processId='" + processId + '\'' +
                "project='" + project + '\'' +
                "createTime='" + createTime + '\'' +
                "completeTime='" + completeTime + '\'' +
                "status='" + status + '\'' +
                "curUser='" + curUser + '\'' +
                "createUser='" + createUser + '\'' +
                "acceptUser='" + acceptUser + '\'' +
            '}';
    }

    public static Builder Build(){return new Builder();}

    public static ConditionBuilder ConditionBuild(){return new ConditionBuilder();}

    public static UpdateBuilder UpdateBuild(){return new UpdateBuilder();}

    public static QueryBuilder QueryBuild(){return new QueryBuilder();}

    public static class UpdateBuilder {

        private WbWorkOrder set;

        private ConditionBuilder where;

        public UpdateBuilder set(WbWorkOrder set){
            this.set = set;
            return this;
        }

        public WbWorkOrder getSet(){
            return this.set;
        }

        public UpdateBuilder where(ConditionBuilder where){
            this.where = where;
            return this;
        }

        public ConditionBuilder getWhere(){
            return this.where;
        }

        public UpdateBuilder build(){
            return this;
        }
    }

    public static class QueryBuilder extends WbWorkOrder{
        /**
        * 需要返回的列
        */
        private Map<String,Object> fetchFields;

        public Map<String,Object> getFetchFields(){return this.fetchFields;}

        private List<Integer> idList;

        public List<Integer> getIdList(){return this.idList;}

        private Integer idSt;

        private Integer idEd;

        public Integer getIdSt(){return this.idSt;}

        public Integer getIdEd(){return this.idEd;}

        private List<Integer> typeList;

        public List<Integer> getTypeList(){return this.typeList;}

        private Integer typeSt;

        private Integer typeEd;

        public Integer getTypeSt(){return this.typeSt;}

        public Integer getTypeEd(){return this.typeEd;}

        private List<String> nameList;

        public List<String> getNameList(){return this.nameList;}


        private List<String> fuzzyName;

        public List<String> getFuzzyName(){return this.fuzzyName;}

        private List<String> rightFuzzyName;

        public List<String> getRightFuzzyName(){return this.rightFuzzyName;}
        private List<String> processIdList;

        public List<String> getProcessIdList(){return this.processIdList;}


        private List<String> fuzzyProcessId;

        public List<String> getFuzzyProcessId(){return this.fuzzyProcessId;}

        private List<String> rightFuzzyProcessId;

        public List<String> getRightFuzzyProcessId(){return this.rightFuzzyProcessId;}
        private List<String> projectList;

        public List<String> getProjectList(){return this.projectList;}


        private List<String> fuzzyProject;

        public List<String> getFuzzyProject(){return this.fuzzyProject;}

        private List<String> rightFuzzyProject;

        public List<String> getRightFuzzyProject(){return this.rightFuzzyProject;}
        private List<java.time.LocalDateTime> createTimeList;

        public List<java.time.LocalDateTime> getCreateTimeList(){return this.createTimeList;}

        private java.time.LocalDateTime createTimeSt;

        private java.time.LocalDateTime createTimeEd;

        public java.time.LocalDateTime getCreateTimeSt(){return this.createTimeSt;}

        public java.time.LocalDateTime getCreateTimeEd(){return this.createTimeEd;}

        private List<java.time.LocalDateTime> completeTimeList;

        public List<java.time.LocalDateTime> getCompleteTimeList(){return this.completeTimeList;}

        private java.time.LocalDateTime completeTimeSt;

        private java.time.LocalDateTime completeTimeEd;

        public java.time.LocalDateTime getCompleteTimeSt(){return this.completeTimeSt;}

        public java.time.LocalDateTime getCompleteTimeEd(){return this.completeTimeEd;}

        private List<Integer> statusList;

        public List<Integer> getStatusList(){return this.statusList;}

        private Integer statusSt;

        private Integer statusEd;

        public Integer getStatusSt(){return this.statusSt;}

        public Integer getStatusEd(){return this.statusEd;}

        private List<Integer> curUserList;

        public List<Integer> getCurUserList(){return this.curUserList;}

        private Integer curUserSt;

        private Integer curUserEd;

        public Integer getCurUserSt(){return this.curUserSt;}

        public Integer getCurUserEd(){return this.curUserEd;}

        private List<Integer> createUserList;

        public List<Integer> getCreateUserList(){return this.createUserList;}

        private Integer createUserSt;

        private Integer createUserEd;

        public Integer getCreateUserSt(){return this.createUserSt;}

        public Integer getCreateUserEd(){return this.createUserEd;}

        private List<Integer> acceptUserList;

        public List<Integer> getAcceptUserList(){return this.acceptUserList;}

        private Integer acceptUserSt;

        private Integer acceptUserEd;

        public Integer getAcceptUserSt(){return this.acceptUserSt;}

        public Integer getAcceptUserEd(){return this.acceptUserEd;}

        private QueryBuilder (){
            this.fetchFields = new HashMap<>();
        }

        public QueryBuilder idBetWeen(Integer idSt,Integer idEd){
            this.idSt = idSt;
            this.idEd = idEd;
            return this;
        }

        public QueryBuilder idGreaterEqThan(Integer idSt){
            this.idSt = idSt;
            return this;
        }
        public QueryBuilder idLessEqThan(Integer idEd){
            this.idEd = idEd;
            return this;
        }


        public QueryBuilder id(Integer id){
            setId(id);
            return this;
        }

        public QueryBuilder idList(Integer ... id){
            this.idList = solveNullList(id);
            return this;
        }

        public QueryBuilder idList(List<Integer> id){
            this.idList = id;
            return this;
        }

        public QueryBuilder fetchId(){
            setFetchFields("fetchFields","id");
            return this;
        }

        public QueryBuilder excludeId(){
            setFetchFields("excludeFields","id");
            return this;
        }

        public QueryBuilder typeBetWeen(Integer typeSt,Integer typeEd){
            this.typeSt = typeSt;
            this.typeEd = typeEd;
            return this;
        }

        public QueryBuilder typeGreaterEqThan(Integer typeSt){
            this.typeSt = typeSt;
            return this;
        }
        public QueryBuilder typeLessEqThan(Integer typeEd){
            this.typeEd = typeEd;
            return this;
        }


        public QueryBuilder type(Integer type){
            setType(type);
            return this;
        }

        public QueryBuilder typeList(Integer ... type){
            this.typeList = solveNullList(type);
            return this;
        }

        public QueryBuilder typeList(List<Integer> type){
            this.typeList = type;
            return this;
        }

        public QueryBuilder fetchType(){
            setFetchFields("fetchFields","type");
            return this;
        }

        public QueryBuilder excludeType(){
            setFetchFields("excludeFields","type");
            return this;
        }

        public QueryBuilder fuzzyName (List<String> fuzzyName){
            this.fuzzyName = fuzzyName;
            return this;
        }

        public QueryBuilder fuzzyName (String ... fuzzyName){
            this.fuzzyName = solveNullList(fuzzyName);
            return this;
        }

        public QueryBuilder rightFuzzyName (List<String> rightFuzzyName){
            this.rightFuzzyName = rightFuzzyName;
            return this;
        }

        public QueryBuilder rightFuzzyName (String ... rightFuzzyName){
            this.rightFuzzyName = solveNullList(rightFuzzyName);
            return this;
        }

        public QueryBuilder name(String name){
            setName(name);
            return this;
        }

        public QueryBuilder nameList(String ... name){
            this.nameList = solveNullList(name);
            return this;
        }

        public QueryBuilder nameList(List<String> name){
            this.nameList = name;
            return this;
        }

        public QueryBuilder fetchName(){
            setFetchFields("fetchFields","name");
            return this;
        }

        public QueryBuilder excludeName(){
            setFetchFields("excludeFields","name");
            return this;
        }

        public QueryBuilder fuzzyProcessId (List<String> fuzzyProcessId){
            this.fuzzyProcessId = fuzzyProcessId;
            return this;
        }

        public QueryBuilder fuzzyProcessId (String ... fuzzyProcessId){
            this.fuzzyProcessId = solveNullList(fuzzyProcessId);
            return this;
        }

        public QueryBuilder rightFuzzyProcessId (List<String> rightFuzzyProcessId){
            this.rightFuzzyProcessId = rightFuzzyProcessId;
            return this;
        }

        public QueryBuilder rightFuzzyProcessId (String ... rightFuzzyProcessId){
            this.rightFuzzyProcessId = solveNullList(rightFuzzyProcessId);
            return this;
        }

        public QueryBuilder processId(String processId){
            setProcessId(processId);
            return this;
        }

        public QueryBuilder processIdList(String ... processId){
            this.processIdList = solveNullList(processId);
            return this;
        }

        public QueryBuilder processIdList(List<String> processId){
            this.processIdList = processId;
            return this;
        }

        public QueryBuilder fetchProcessId(){
            setFetchFields("fetchFields","processId");
            return this;
        }

        public QueryBuilder excludeProcessId(){
            setFetchFields("excludeFields","processId");
            return this;
        }

        public QueryBuilder fuzzyProject (List<String> fuzzyProject){
            this.fuzzyProject = fuzzyProject;
            return this;
        }

        public QueryBuilder fuzzyProject (String ... fuzzyProject){
            this.fuzzyProject = solveNullList(fuzzyProject);
            return this;
        }

        public QueryBuilder rightFuzzyProject (List<String> rightFuzzyProject){
            this.rightFuzzyProject = rightFuzzyProject;
            return this;
        }

        public QueryBuilder rightFuzzyProject (String ... rightFuzzyProject){
            this.rightFuzzyProject = solveNullList(rightFuzzyProject);
            return this;
        }

        public QueryBuilder project(String project){
            setProject(project);
            return this;
        }

        public QueryBuilder projectList(String ... project){
            this.projectList = solveNullList(project);
            return this;
        }

        public QueryBuilder projectList(List<String> project){
            this.projectList = project;
            return this;
        }

        public QueryBuilder fetchProject(){
            setFetchFields("fetchFields","project");
            return this;
        }

        public QueryBuilder excludeProject(){
            setFetchFields("excludeFields","project");
            return this;
        }

        public QueryBuilder createTimeBetWeen(java.time.LocalDateTime createTimeSt,java.time.LocalDateTime createTimeEd){
            this.createTimeSt = createTimeSt;
            this.createTimeEd = createTimeEd;
            return this;
        }

        public QueryBuilder createTimeGreaterEqThan(java.time.LocalDateTime createTimeSt){
            this.createTimeSt = createTimeSt;
            return this;
        }
        public QueryBuilder createTimeLessEqThan(java.time.LocalDateTime createTimeEd){
            this.createTimeEd = createTimeEd;
            return this;
        }


        public QueryBuilder createTime(java.time.LocalDateTime createTime){
            setCreateTime(createTime);
            return this;
        }

        public QueryBuilder createTimeList(java.time.LocalDateTime ... createTime){
            this.createTimeList = solveNullList(createTime);
            return this;
        }

        public QueryBuilder createTimeList(List<java.time.LocalDateTime> createTime){
            this.createTimeList = createTime;
            return this;
        }

        public QueryBuilder fetchCreateTime(){
            setFetchFields("fetchFields","createTime");
            return this;
        }

        public QueryBuilder excludeCreateTime(){
            setFetchFields("excludeFields","createTime");
            return this;
        }

        public QueryBuilder completeTimeBetWeen(java.time.LocalDateTime completeTimeSt,java.time.LocalDateTime completeTimeEd){
            this.completeTimeSt = completeTimeSt;
            this.completeTimeEd = completeTimeEd;
            return this;
        }

        public QueryBuilder completeTimeGreaterEqThan(java.time.LocalDateTime completeTimeSt){
            this.completeTimeSt = completeTimeSt;
            return this;
        }
        public QueryBuilder completeTimeLessEqThan(java.time.LocalDateTime completeTimeEd){
            this.completeTimeEd = completeTimeEd;
            return this;
        }


        public QueryBuilder completeTime(java.time.LocalDateTime completeTime){
            setCompleteTime(completeTime);
            return this;
        }

        public QueryBuilder completeTimeList(java.time.LocalDateTime ... completeTime){
            this.completeTimeList = solveNullList(completeTime);
            return this;
        }

        public QueryBuilder completeTimeList(List<java.time.LocalDateTime> completeTime){
            this.completeTimeList = completeTime;
            return this;
        }

        public QueryBuilder fetchCompleteTime(){
            setFetchFields("fetchFields","completeTime");
            return this;
        }

        public QueryBuilder excludeCompleteTime(){
            setFetchFields("excludeFields","completeTime");
            return this;
        }

        public QueryBuilder statusBetWeen(Integer statusSt,Integer statusEd){
            this.statusSt = statusSt;
            this.statusEd = statusEd;
            return this;
        }

        public QueryBuilder statusGreaterEqThan(Integer statusSt){
            this.statusSt = statusSt;
            return this;
        }
        public QueryBuilder statusLessEqThan(Integer statusEd){
            this.statusEd = statusEd;
            return this;
        }


        public QueryBuilder status(Integer status){
            setStatus(status);
            return this;
        }

        public QueryBuilder statusList(Integer ... status){
            this.statusList = solveNullList(status);
            return this;
        }

        public QueryBuilder statusList(List<Integer> status){
            this.statusList = status;
            return this;
        }

        public QueryBuilder fetchStatus(){
            setFetchFields("fetchFields","status");
            return this;
        }

        public QueryBuilder excludeStatus(){
            setFetchFields("excludeFields","status");
            return this;
        }

        public QueryBuilder curUserBetWeen(Integer curUserSt,Integer curUserEd){
            this.curUserSt = curUserSt;
            this.curUserEd = curUserEd;
            return this;
        }

        public QueryBuilder curUserGreaterEqThan(Integer curUserSt){
            this.curUserSt = curUserSt;
            return this;
        }
        public QueryBuilder curUserLessEqThan(Integer curUserEd){
            this.curUserEd = curUserEd;
            return this;
        }


        public QueryBuilder curUser(Integer curUser){
            setCurUser(curUser);
            return this;
        }

        public QueryBuilder curUserList(Integer ... curUser){
            this.curUserList = solveNullList(curUser);
            return this;
        }

        public QueryBuilder curUserList(List<Integer> curUser){
            this.curUserList = curUser;
            return this;
        }

        public QueryBuilder fetchCurUser(){
            setFetchFields("fetchFields","curUser");
            return this;
        }

        public QueryBuilder excludeCurUser(){
            setFetchFields("excludeFields","curUser");
            return this;
        }

        public QueryBuilder createUserBetWeen(Integer createUserSt,Integer createUserEd){
            this.createUserSt = createUserSt;
            this.createUserEd = createUserEd;
            return this;
        }

        public QueryBuilder createUserGreaterEqThan(Integer createUserSt){
            this.createUserSt = createUserSt;
            return this;
        }
        public QueryBuilder createUserLessEqThan(Integer createUserEd){
            this.createUserEd = createUserEd;
            return this;
        }


        public QueryBuilder createUser(Integer createUser){
            setCreateUser(createUser);
            return this;
        }

        public QueryBuilder createUserList(Integer ... createUser){
            this.createUserList = solveNullList(createUser);
            return this;
        }

        public QueryBuilder createUserList(List<Integer> createUser){
            this.createUserList = createUser;
            return this;
        }

        public QueryBuilder fetchCreateUser(){
            setFetchFields("fetchFields","createUser");
            return this;
        }

        public QueryBuilder excludeCreateUser(){
            setFetchFields("excludeFields","createUser");
            return this;
        }

        public QueryBuilder acceptUserBetWeen(Integer acceptUserSt,Integer acceptUserEd){
            this.acceptUserSt = acceptUserSt;
            this.acceptUserEd = acceptUserEd;
            return this;
        }

        public QueryBuilder acceptUserGreaterEqThan(Integer acceptUserSt){
            this.acceptUserSt = acceptUserSt;
            return this;
        }
        public QueryBuilder acceptUserLessEqThan(Integer acceptUserEd){
            this.acceptUserEd = acceptUserEd;
            return this;
        }


        public QueryBuilder acceptUser(Integer acceptUser){
            setAcceptUser(acceptUser);
            return this;
        }

        public QueryBuilder acceptUserList(Integer ... acceptUser){
            this.acceptUserList = solveNullList(acceptUser);
            return this;
        }

        public QueryBuilder acceptUserList(List<Integer> acceptUser){
            this.acceptUserList = acceptUser;
            return this;
        }

        public QueryBuilder fetchAcceptUser(){
            setFetchFields("fetchFields","acceptUser");
            return this;
        }

        public QueryBuilder excludeAcceptUser(){
            setFetchFields("excludeFields","acceptUser");
            return this;
        }
        private <T>List<T> solveNullList(T ... objs){
            if (objs != null){
            List<T> list = new ArrayList<>();
                for (T item : objs){
                    if (item != null){
                        list.add(item);
                    }
                }
                return list;
            }
            return null;
        }

        public QueryBuilder fetchAll(){
            this.fetchFields.put("AllFields",true);
            return this;
        }

        public QueryBuilder addField(String ... fields){
            List<String> list = new ArrayList<>();
            if (fields != null){
                for (String field : fields){
                    list.add(field);
                }
            }
            this.fetchFields.put("otherFields",list);
            return this;
        }
        @SuppressWarnings("unchecked")
        private void setFetchFields(String key,String val){
            Map<String,Boolean> fields= (Map<String, Boolean>) this.fetchFields.get(key);
            if (fields == null){
                fields = new HashMap<>();
            }
            fields.put(val,true);
            this.fetchFields.put(key,fields);
        }

        public WbWorkOrder build(){return this;}
    }


    public static class ConditionBuilder{
        private List<Integer> idList;

        public List<Integer> getIdList(){return this.idList;}

        private Integer idSt;

        private Integer idEd;

        public Integer getIdSt(){return this.idSt;}

        public Integer getIdEd(){return this.idEd;}

        private List<Integer> typeList;

        public List<Integer> getTypeList(){return this.typeList;}

        private Integer typeSt;

        private Integer typeEd;

        public Integer getTypeSt(){return this.typeSt;}

        public Integer getTypeEd(){return this.typeEd;}

        private List<String> nameList;

        public List<String> getNameList(){return this.nameList;}


        private List<String> fuzzyName;

        public List<String> getFuzzyName(){return this.fuzzyName;}

        private List<String> rightFuzzyName;

        public List<String> getRightFuzzyName(){return this.rightFuzzyName;}
        private List<String> processIdList;

        public List<String> getProcessIdList(){return this.processIdList;}


        private List<String> fuzzyProcessId;

        public List<String> getFuzzyProcessId(){return this.fuzzyProcessId;}

        private List<String> rightFuzzyProcessId;

        public List<String> getRightFuzzyProcessId(){return this.rightFuzzyProcessId;}
        private List<String> projectList;

        public List<String> getProjectList(){return this.projectList;}


        private List<String> fuzzyProject;

        public List<String> getFuzzyProject(){return this.fuzzyProject;}

        private List<String> rightFuzzyProject;

        public List<String> getRightFuzzyProject(){return this.rightFuzzyProject;}
        private List<java.time.LocalDateTime> createTimeList;

        public List<java.time.LocalDateTime> getCreateTimeList(){return this.createTimeList;}

        private java.time.LocalDateTime createTimeSt;

        private java.time.LocalDateTime createTimeEd;

        public java.time.LocalDateTime getCreateTimeSt(){return this.createTimeSt;}

        public java.time.LocalDateTime getCreateTimeEd(){return this.createTimeEd;}

        private List<java.time.LocalDateTime> completeTimeList;

        public List<java.time.LocalDateTime> getCompleteTimeList(){return this.completeTimeList;}

        private java.time.LocalDateTime completeTimeSt;

        private java.time.LocalDateTime completeTimeEd;

        public java.time.LocalDateTime getCompleteTimeSt(){return this.completeTimeSt;}

        public java.time.LocalDateTime getCompleteTimeEd(){return this.completeTimeEd;}

        private List<Integer> statusList;

        public List<Integer> getStatusList(){return this.statusList;}

        private Integer statusSt;

        private Integer statusEd;

        public Integer getStatusSt(){return this.statusSt;}

        public Integer getStatusEd(){return this.statusEd;}

        private List<Integer> curUserList;

        public List<Integer> getCurUserList(){return this.curUserList;}

        private Integer curUserSt;

        private Integer curUserEd;

        public Integer getCurUserSt(){return this.curUserSt;}

        public Integer getCurUserEd(){return this.curUserEd;}

        private List<Integer> createUserList;

        public List<Integer> getCreateUserList(){return this.createUserList;}

        private Integer createUserSt;

        private Integer createUserEd;

        public Integer getCreateUserSt(){return this.createUserSt;}

        public Integer getCreateUserEd(){return this.createUserEd;}

        private List<Integer> acceptUserList;

        public List<Integer> getAcceptUserList(){return this.acceptUserList;}

        private Integer acceptUserSt;

        private Integer acceptUserEd;

        public Integer getAcceptUserSt(){return this.acceptUserSt;}

        public Integer getAcceptUserEd(){return this.acceptUserEd;}


        public ConditionBuilder idBetWeen(Integer idSt,Integer idEd){
            this.idSt = idSt;
            this.idEd = idEd;
            return this;
        }

        public ConditionBuilder idGreaterEqThan(Integer idSt){
            this.idSt = idSt;
            return this;
        }
        public ConditionBuilder idLessEqThan(Integer idEd){
            this.idEd = idEd;
            return this;
        }


        public ConditionBuilder idList(Integer ... id){
            this.idList = solveNullList(id);
            return this;
        }

        public ConditionBuilder idList(List<Integer> id){
            this.idList = id;
            return this;
        }

        public ConditionBuilder typeBetWeen(Integer typeSt,Integer typeEd){
            this.typeSt = typeSt;
            this.typeEd = typeEd;
            return this;
        }

        public ConditionBuilder typeGreaterEqThan(Integer typeSt){
            this.typeSt = typeSt;
            return this;
        }
        public ConditionBuilder typeLessEqThan(Integer typeEd){
            this.typeEd = typeEd;
            return this;
        }


        public ConditionBuilder typeList(Integer ... type){
            this.typeList = solveNullList(type);
            return this;
        }

        public ConditionBuilder typeList(List<Integer> type){
            this.typeList = type;
            return this;
        }

        public ConditionBuilder fuzzyName (List<String> fuzzyName){
            this.fuzzyName = fuzzyName;
            return this;
        }

        public ConditionBuilder fuzzyName (String ... fuzzyName){
            this.fuzzyName = solveNullList(fuzzyName);
            return this;
        }

        public ConditionBuilder rightFuzzyName (List<String> rightFuzzyName){
            this.rightFuzzyName = rightFuzzyName;
            return this;
        }

        public ConditionBuilder rightFuzzyName (String ... rightFuzzyName){
            this.rightFuzzyName = solveNullList(rightFuzzyName);
            return this;
        }

        public ConditionBuilder nameList(String ... name){
            this.nameList = solveNullList(name);
            return this;
        }

        public ConditionBuilder nameList(List<String> name){
            this.nameList = name;
            return this;
        }

        public ConditionBuilder fuzzyProcessId (List<String> fuzzyProcessId){
            this.fuzzyProcessId = fuzzyProcessId;
            return this;
        }

        public ConditionBuilder fuzzyProcessId (String ... fuzzyProcessId){
            this.fuzzyProcessId = solveNullList(fuzzyProcessId);
            return this;
        }

        public ConditionBuilder rightFuzzyProcessId (List<String> rightFuzzyProcessId){
            this.rightFuzzyProcessId = rightFuzzyProcessId;
            return this;
        }

        public ConditionBuilder rightFuzzyProcessId (String ... rightFuzzyProcessId){
            this.rightFuzzyProcessId = solveNullList(rightFuzzyProcessId);
            return this;
        }

        public ConditionBuilder processIdList(String ... processId){
            this.processIdList = solveNullList(processId);
            return this;
        }

        public ConditionBuilder processIdList(List<String> processId){
            this.processIdList = processId;
            return this;
        }

        public ConditionBuilder fuzzyProject (List<String> fuzzyProject){
            this.fuzzyProject = fuzzyProject;
            return this;
        }

        public ConditionBuilder fuzzyProject (String ... fuzzyProject){
            this.fuzzyProject = solveNullList(fuzzyProject);
            return this;
        }

        public ConditionBuilder rightFuzzyProject (List<String> rightFuzzyProject){
            this.rightFuzzyProject = rightFuzzyProject;
            return this;
        }

        public ConditionBuilder rightFuzzyProject (String ... rightFuzzyProject){
            this.rightFuzzyProject = solveNullList(rightFuzzyProject);
            return this;
        }

        public ConditionBuilder projectList(String ... project){
            this.projectList = solveNullList(project);
            return this;
        }

        public ConditionBuilder projectList(List<String> project){
            this.projectList = project;
            return this;
        }

        public ConditionBuilder createTimeBetWeen(java.time.LocalDateTime createTimeSt,java.time.LocalDateTime createTimeEd){
            this.createTimeSt = createTimeSt;
            this.createTimeEd = createTimeEd;
            return this;
        }

        public ConditionBuilder createTimeGreaterEqThan(java.time.LocalDateTime createTimeSt){
            this.createTimeSt = createTimeSt;
            return this;
        }
        public ConditionBuilder createTimeLessEqThan(java.time.LocalDateTime createTimeEd){
            this.createTimeEd = createTimeEd;
            return this;
        }


        public ConditionBuilder createTimeList(java.time.LocalDateTime ... createTime){
            this.createTimeList = solveNullList(createTime);
            return this;
        }

        public ConditionBuilder createTimeList(List<java.time.LocalDateTime> createTime){
            this.createTimeList = createTime;
            return this;
        }

        public ConditionBuilder completeTimeBetWeen(java.time.LocalDateTime completeTimeSt,java.time.LocalDateTime completeTimeEd){
            this.completeTimeSt = completeTimeSt;
            this.completeTimeEd = completeTimeEd;
            return this;
        }

        public ConditionBuilder completeTimeGreaterEqThan(java.time.LocalDateTime completeTimeSt){
            this.completeTimeSt = completeTimeSt;
            return this;
        }
        public ConditionBuilder completeTimeLessEqThan(java.time.LocalDateTime completeTimeEd){
            this.completeTimeEd = completeTimeEd;
            return this;
        }


        public ConditionBuilder completeTimeList(java.time.LocalDateTime ... completeTime){
            this.completeTimeList = solveNullList(completeTime);
            return this;
        }

        public ConditionBuilder completeTimeList(List<java.time.LocalDateTime> completeTime){
            this.completeTimeList = completeTime;
            return this;
        }

        public ConditionBuilder statusBetWeen(Integer statusSt,Integer statusEd){
            this.statusSt = statusSt;
            this.statusEd = statusEd;
            return this;
        }

        public ConditionBuilder statusGreaterEqThan(Integer statusSt){
            this.statusSt = statusSt;
            return this;
        }
        public ConditionBuilder statusLessEqThan(Integer statusEd){
            this.statusEd = statusEd;
            return this;
        }


        public ConditionBuilder statusList(Integer ... status){
            this.statusList = solveNullList(status);
            return this;
        }

        public ConditionBuilder statusList(List<Integer> status){
            this.statusList = status;
            return this;
        }

        public ConditionBuilder curUserBetWeen(Integer curUserSt,Integer curUserEd){
            this.curUserSt = curUserSt;
            this.curUserEd = curUserEd;
            return this;
        }

        public ConditionBuilder curUserGreaterEqThan(Integer curUserSt){
            this.curUserSt = curUserSt;
            return this;
        }
        public ConditionBuilder curUserLessEqThan(Integer curUserEd){
            this.curUserEd = curUserEd;
            return this;
        }


        public ConditionBuilder curUserList(Integer ... curUser){
            this.curUserList = solveNullList(curUser);
            return this;
        }

        public ConditionBuilder curUserList(List<Integer> curUser){
            this.curUserList = curUser;
            return this;
        }

        public ConditionBuilder createUserBetWeen(Integer createUserSt,Integer createUserEd){
            this.createUserSt = createUserSt;
            this.createUserEd = createUserEd;
            return this;
        }

        public ConditionBuilder createUserGreaterEqThan(Integer createUserSt){
            this.createUserSt = createUserSt;
            return this;
        }
        public ConditionBuilder createUserLessEqThan(Integer createUserEd){
            this.createUserEd = createUserEd;
            return this;
        }


        public ConditionBuilder createUserList(Integer ... createUser){
            this.createUserList = solveNullList(createUser);
            return this;
        }

        public ConditionBuilder createUserList(List<Integer> createUser){
            this.createUserList = createUser;
            return this;
        }

        public ConditionBuilder acceptUserBetWeen(Integer acceptUserSt,Integer acceptUserEd){
            this.acceptUserSt = acceptUserSt;
            this.acceptUserEd = acceptUserEd;
            return this;
        }

        public ConditionBuilder acceptUserGreaterEqThan(Integer acceptUserSt){
            this.acceptUserSt = acceptUserSt;
            return this;
        }
        public ConditionBuilder acceptUserLessEqThan(Integer acceptUserEd){
            this.acceptUserEd = acceptUserEd;
            return this;
        }


        public ConditionBuilder acceptUserList(Integer ... acceptUser){
            this.acceptUserList = solveNullList(acceptUser);
            return this;
        }

        public ConditionBuilder acceptUserList(List<Integer> acceptUser){
            this.acceptUserList = acceptUser;
            return this;
        }

        private <T>List<T> solveNullList(T ... objs){
            if (objs != null){
            List<T> list = new ArrayList<>();
                for (T item : objs){
                    if (item != null){
                        list.add(item);
                    }
                }
                return list;
            }
            return null;
        }

        public ConditionBuilder build(){return this;}
    }

    public static class Builder {

        private WbWorkOrder obj;

        public Builder(){
            this.obj = new WbWorkOrder();
        }

        public Builder id(Integer id){
            this.obj.setId(id);
            return this;
        }
        public Builder type(Integer type){
            this.obj.setType(type);
            return this;
        }
        public Builder name(String name){
            this.obj.setName(name);
            return this;
        }
        public Builder processId(String processId){
            this.obj.setProcessId(processId);
            return this;
        }
        public Builder project(String project){
            this.obj.setProject(project);
            return this;
        }
        public Builder createTime(java.time.LocalDateTime createTime){
            this.obj.setCreateTime(createTime);
            return this;
        }
        public Builder completeTime(java.time.LocalDateTime completeTime){
            this.obj.setCompleteTime(completeTime);
            return this;
        }
        public Builder status(Integer status){
            this.obj.setStatus(status);
            return this;
        }
        public Builder curUser(Integer curUser){
            this.obj.setCurUser(curUser);
            return this;
        }
        public Builder createUser(Integer createUser){
            this.obj.setCreateUser(createUser);
            return this;
        }
        public Builder acceptUser(Integer acceptUser){
            this.obj.setAcceptUser(acceptUser);
            return this;
        }
        public WbWorkOrder build(){return obj;}
    }

}
